// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import AutomaticRecode from "../../Commons/AutomaticRecode";

const { ccclass, property } = cc._decorator;

@ccclass
export default class TaskEntity extends AutomaticRecode {

    taskId: number;
    taskPregress: number;
    rewards: boolean[] = [];


    get nestRewardIndex(): number {
        for (let i = 0; i < this.rewards.length; i++) {
            if (this.rewards[i] == false) {
                return i;
            }
        }
        return 0;
    }
}
